﻿using _1_Interfaces.Interfaces.Cjw;
using _1_Interfaces.Models.Dtos.Cjw;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace _3_Controllers.Controllers.Cjw
{
    /// <summary>
    /// 统计分析服务
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CjwStatisticsController : ControllerBase
    {
        private IStatisticsService _statisticsService;
        public CjwStatisticsController(IStatisticsService statisticsService)
        {
            _statisticsService = statisticsService;
        }

        /// <summary>
        /// 统计分析
        /// </summary>
        /// <param name="departmentId">科室id</param>
        /// <returns></returns>
        [HttpGet]
        public StatisticsDto GetStatistics(int departmentId)
        {
            return _statisticsService.GetStatistics(departmentId);
        }
    }
}
